from factory import cfactory

class componentMeta(type):
    def __new__(obj, name, base, attributes):
        if name == 'component':
            return super(componentMeta, obj).__new__(obj, name, base, attributes)

        ret = super(componentMeta, obj).__new__(obj, name, base, attributes)
        cfactory.register(ret)
        return ret